<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<html>
<head>
    <%@ include file="/WEB-INF/views/include/head.jsp" %>
    <title>系统监控</title>
    <meta name="decorator" content="default"/>
    <script type="text/javascript">
        $(document).ready(function () {

        });

        function page(n, s) {
            $("#pageNo").val(n);
            $("#pageSize").val(s);
            $("#searchForm").submit();
            return false;
        }
    </script>
</head>
<body>
<ul class="nav nav-tabs">
    <li class="active"><a href="${ctx}/monitor/server/">系统监控</a></li>
</ul>
<table id="contentTable" class="table table-striped table-bordered table-condensed">
    <tbody>
    <tr>
        <td colspan="2">CPU</td>
        <td rowspan="7" colspan="2"></td>
        <td colspan="3">内存</td>
    </tr>
    <tr>
        <td>属性</td>
        <td>值</td>

        <td>属性</td>
        <td>内存</td>
        <td>JVM</td>
    </tr>
    <tr>
        <td>核心数</td>
        <td>${osinfo.cpuNum} 个</td>
        <td>总内存</td>
        <td>${osinfo.memTotal}</td>
        <td>${osinfo.jvmTotal}</td>
    </tr>
    <tr>
        <td>用户使用率</td>
        <td><fmt:formatNumber type="number" value="${osinfo.cpuUserUsed/osinfo.cpuTotal*100}" pattern="0.00"
                              maxFractionDigits="2"/> %
        </td>
        <td>已用内存</td>
        <td>${osinfo.memUsed}</td>
        <td>${osinfo.jvmUsed}</td>
    </tr>
    <tr>
        <td>系统使用率</td>
        <td><fmt:formatNumber type="number" value="${osinfo.cpuSysUsed/osinfo.cpuTotal*100}" pattern="0.00"
                              maxFractionDigits="2"/> %
        </td>
        <td>剩余内存</td>
        <td>${osinfo.memFree}</td>
        <td>${osinfo.jvmFree}</td>
    </tr>
    <tr>
        <td>当前空闲率</td>
        <td><fmt:formatNumber type="number" value="${osinfo.cpuFree/osinfo.cpuTotal*100}" pattern="0.00"
                              maxFractionDigits="2"/> %
        </td>
        <td>使用率</td>
        <td>${osinfo.memUsage} %</td>
        <td>${osinfo.jvmUsage} %</td>
    </tr>
    </tbody>
</table>
<br>
<table class="table table-striped table-bordered table-condensed">
    <tbody>
    <tr colspan="4">
        <td>服务器信息</td>
    </tr>
    <tr>
        <td>服务器名称</td>
        <td>${osinfo.sysComputerName}</td>
        <td>操作系统</td>
        <td>${osinfo.sysOsName}</td>
    </tr>
    <tr>
        <td>服务器IP</td>
        <td>${osinfo.sysComputerIp}</td>
        <td>系统架构</td>
        <td>${osinfo.sysOsArch}</td>
    </tr>
    </tbody>
</table>

<br>
<table class="table table-striped table-bordered table-condensed">
    <tbody>
    <tr colspan="4">
        <td>Java虚拟机信息</td>
    </tr>
    <tr>
        <td>Java名称</td>
        <td>${osinfo.jvmName}</td>
        <td>Java版本</td>
        <td>${osinfo.jdkVersion}</td>
    </tr>
    <tr>
        <td>启动时间</td>
        <td>${osinfo.jvmStartTime}</td>
        <td>运行时长</td>
        <td>${osinfo.jvmRunTime}</td>
    </tr>
    <tr>
        <td>安装路径</td>
        <td>${osinfo.jdkHome}</td>
        <td>项目路径</td>
        <td>${osinfo.sysOsArch}</td>
    </tr>
    </tbody>
</table>
<br>
<table class="table table-striped table-bordered table-condensed">
    <tbody>
    <tr colspan="7">
        <td>磁盘状态</td>
    </tr>
    <tr>
        <td>盘符路径</td>
        <td>文件系统</td>
        <td>盘符类型</td>
        <td>总大小</td>
        <td>可用大小</td>
        <td>已用大小</td>
        <td>已用百分比</td>
    </tr>
    <c:forEach items="${osinfo.sysFiles}" var="sysfiles">
        <tr>
            <td>${sysfiles.dirName}</td>
            <td>${sysfiles.sysTypeName}</td>
            <td>${sysfiles.typeName}</td>
            <td>${sysfiles.total}</td>
            <td>${sysfiles.free}</td>
            <td>${sysfiles.used}</td>
            <td>${sysfiles.usage} %</td>
        </tr>
    </c:forEach>
    </tbody>
</table>


</body>
</html>